<?php
/**
 * Created by PhpStorm.
 * User: hpp
 * Date: 2019/2/13
 * Time: 10:54
 */

namespace app\admin\command;

use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;

use think\Db;

class ClearData extends Command
{
    protected function configure()
    {
        $this->setName('clear_data')
            ->setDescription('Clear login log');
    }

    protected function execute(Input $input, Output $output)
    {
        $sql = 'truncate table hpp_login_log';
        Db::execute($sql);
    }
}